<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include  file="/jsps/common/taglibs.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/client_common.css"/>">
	
	<script type="text/javascript">
	    
	    function look_detail(no){
	        location.href="<c:url value="/indentMgr?act=look_detail&indentNo="/>"+no;
	    }
	    
	    //pageno 指定页码数
         function doQuery(pageno)
         {
           if(pageno<1 || pageno>${page.totalPageNum})
           {
              alert("页号超出范围，有效范围：[1-"+${page.totalPageNum}+"]!");
              ${'pageNo'}.select();
              return;
           }
           //location.href="<c:url value="/indentMgr?act=for_list"/>"+"&page_no="+pageno;
           document.forms[0].page_no.value=pageno;
           document.forms[0].submit();
         }
         function doQuery2(){
           
           var pageNo=document.getElementById("pageNo").value;
           doQuery(pageNo);
           
         }
         //控制键盘输入
         function onlynumber(){
		   if(event.keyCode==13)
			 return true;
		   if(event.keyCode<48||event.keyCode>57)
		   {
			 event.keyCode=0;
			 event.returnValue=false;
		   }
		   event.returnValue=true;
	     }
	</script>

  </head>
  
  <body>
      <div class="wrapper_div">
          <span>查询订单信息</span>
          <div class="wrapper_div">
              <form class="search_form" action="<c:url value="indentMgr"/>">
                  <input type="hidden" name="act" value="for_list" size="10"/>
                  <input type="hidden" name="page_no" value=""/>
                  <span>下单会员:</span>
                  <input type="text" name="order_name" value="${param.order_name}" size="10"/>
                  &nbsp;
                  <span>日期范围:</span>
                  <input type="text" name="startDate" value="${param.startDate}" size="10"/>
                  -
                  <input type="text" name="endDate" value="${param.endDate}" size="10"/>
                  <input type="submit" value="查 询"/>
              </form>
          </div>
      </div>
      <hr/>
      <div class="wrapper_div">
          <table class="listtable">
              <thead>
                  <th>订单编号</th>
                  <th>下单会员</th>
                  <th>订单状态</th>
                  <th>生成日期</th>
                  <th>操作</th>
              </thead>
              <c:forEach items="${page.pageContent}" var="indent">
                  <tr>
                      <td>${indent.orderNo}</td>
                      <td>${indent.name}</td>
                      <td>
                          <c:choose>
                              <c:when test="${indent.sign==0}">已提交,未审核</c:when>
                              <c:when test="${indent.sign==1}">已审核，未配货</c:when>
                              <c:when test="${indent.sign==2}">已配货，未发货</c:when>
                              <c:when test="${indent.sign==3}">已发货，未收货</c:when>
                              <c:when test="${indent.sign==4}">已收货，交易成功</c:when>
                          </c:choose>
                      </td>
                      <td>${indent.createDate}</td>
                      <td>
                          <button onclick="look_detail('${indent.orderNo}');">查看详情</button>
                      </td>
                  </tr>
              </c:forEach>
          </table>
      </div>
      <br/>
	  <div class="page_infos">
	            共${page.totalRecNum}条, 当前显示${page.startIndex}-${page.endIndex}条, 第${page.pageNo}/${page.totalPageNum}页
	           |
	           <c:if test="${page.pageNo>1}">
	             <span class="linkspan" onclick="doQuery(1)">首页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.prePage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo-1})">上一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.nextPage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo+1})">下一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.pageNo!=page.totalPageNum}">
	             <span class="linkspan" onclick="doQuery(${page.totalPageNum})">末页</span>&nbsp;
	           </c:if>
	           |
	            到<input type="text" id="pageNo" size=4 style="text-align:right;" onkeypress="onlynumber();"/> 页
	        <button onclick="doQuery2();">跳 转</button>         		           	           	              
	  </div>
      <c:if test="${empty page.pageContent}">
          <div class="no_found" style="color:red">
              sorry,无法查找到您所要求的套房信息.......
          </div>
      </c:if>
  </body>
</html>
